home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / flilib.zip / FLISRC.ZIP / UNCOMPFL.C < prev    next >
C/C++ Source or Header  |  1989-11-17  |  1KB  |  49 lines

  1.  
  2. #include "jlib.h"
  3. #include "aafli.h"
  4. #include "aafii.h"
  5.  
  6. /* Ok, now we've read in a frame of a FLI/FLX file ok.  Given a screen that
  7.    has the last frame on it and the data for this frame, this function
  8.    will switch through the chunks of the frame data updating the screen
  9.    in the process.  The 'colors' parameter indicates whether we should
  10.    update the hardware color map as well as the ram echo. */
  11. void fli_uncomp(Vscreen *f, Fli_frame *frame, Cbuf *cbuf, Boolean see_colors)
  12. {
  13. int j;
  14. struct fli_chunk *chunk;
  15. Cbuf *cb1;
  16.  
  17. if (see_colors)
  18.     aa_wait_vblank();
  19. for (j=0;j<frame->chunks;j++)
  20.     {
  21.     chunk = (struct fli_chunk *)cbuf;    /* start with chunk header */
  22.     cb1 = (Cbuf *)(chunk+1);    /* point to data past chunk header */
  23.     switch (chunk->type)
  24.         {
  25.         case FLI_COLOR:
  26.             if (see_colors)
  27.                 {
  28.                 fii_reg_fcuncomp(cb1);
  29.                 }
  30.             fii_mem_fcuncomp(cb1,f->cmap);
  31.             break;
  32.         case FLI_LC:
  33.             fii_unlccomp(cb1, f->p);
  34.             break;
  35.         case FLI_BLACK:
  36.             i86_wzero(f->p, 32000);
  37.             break;
  38.         case FLI_BRUN:
  39.             fii_unbrun(cb1, f->p, f->h);
  40.             break;
  41.         case FLI_COPY:
  42.             i86_wcopy(cb1,f->p,32000);
  43.             break;
  44.         }
  45.     cbuf = i86_norm_ptr(cbuf + chunk->size);
  46.     }
  47. }
  48.  
  49.